package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.LoginMethodDao;
import com.hera.process.config.domain.LoginMethod;
import com.hera.process.config.service.LoginMethodService;

@Service("loginmethod")
public class LoginMethodServiceImpl implements LoginMethodService{

	static final Logger logger = Logger.getLogger(LoginMethodServiceImpl.class);
	
	
	
	@Autowired
	private LoginMethodDao loginmethododao;
	
	
	@Override
	public LoginMethod findById(Long id) {
		
		return loginmethododao.findOne(id);
	}

	@Override
	public void update(LoginMethod entity) {
	loginmethododao.save(entity);
		
	}

	@Override
	public void save(LoginMethod entity) {
		loginmethododao.save(entity);
		
	}

	@Override
	public void delete(LoginMethod entity) {
		loginmethododao.delete(entity);
		
	}

	@Override
	public List<LoginMethod> findAll() {
		
		return loginmethododao.findAll();
	}

	@Override
	public List<LoginMethod> findAll(FiltroDTO filtroDTO) {
		
		return loginmethododao.obtenerEntidadesPorFiltros(filtroDTO);
	}
	
}
